{% extends "base.html" %}
{% block title %}任务列表{% endblock %}

{% block body_script_block %}

{% endblock %}
{% block body_content_block %}


<div class="row-fluid">

    <div class="span12" name="raw">
        <legend>任务列表</legend>
        {% if jobs %}
            <table class="table table-bordered" id="jobs">
                <thead>
                <tr>
                    
                    <th>任务ID</th>
                    <th>任务名</th>
                    <th>任务运行间隔</th>
                    <th>下次运行时间</th>
                </tr>
                </thead>
                <tbody id="jobs_body">

                </tbody>
            </table>
        {% endif  %}
    </div>

</div>


<script>
    $(document).ready(function() {

        var jobs="{{ jobs }}"
        jobs = eval("(" + jobs.replace(/&quot;/g,"'") + ")");
        $('#jobs_body').dataTable( {

            "data": jobs,
            "language":{
                'url':'/js/dataTables.language.chinese.json'
            },
            "sDom": 'T<"clear">lfrtip',
            "tableTools": {
                "aButtons": [
                    {
                        "sExtends": "csv",
                        "oSelectorOpts": {
                            page: 'all'
                        },
                        "sButtonText": "导出CSV"

                    },
                    {
                        "sExtends": "xls",
                        "oSelectorOpts": {
                            page: 'all'
                        },
                        "sButtonText": "导出EXCEL"
                    }
                ]

            }

        } );
    } );



</script>

{% endblock %}
